local joy__gongao = fk.CreateSkill {

  name = "joy__gongao",

  tags = { Skill.Compulsory, },

}



joy__gongao:addEffect(fk.EnterDying, {
  name = "joy__gongao",
  anim_type = "support",
  frequency = Skill.Compulsory,
  events = {fk.EnterDying},
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(joy__gongao.name) and target ~= player
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:changeMaxHp(player, 1)
    if not player.dead and player:isWounded() then
      room:recover { num = 1, skillName = joy__gongao.name, who = player, recoverBy = player}
    end
  end,
})

return joy__gongao